package com.ytt.core.model.user;

import com.ytt.core.model.schoolClass.SchoolClassDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.Set;

/**
 * UserEditDTO
 *
 * @author chenwen
 * @date 2019/9/17 15:52
 */
@ApiModel(description = "用户编辑信息")
@Getter
@Setter
@ToString(callSuper = true)
public class UserEditDTO {
    @ApiModelProperty(position = 1, notes = "对象ID，新增时应当为null, 系统会自动生成", required = true)
    private String id;

    @ApiModelProperty(position = 110, value = "登录账号, 要求在创建时验证唯一性", required = true)
    @NotNull
    @Size(min = 1, max = 20)
    private String account;

    @ApiModelProperty(position = 120, value = "姓名", required = true)
    @NotNull
    @Size(min = 1, max = 20)
    private String name;
    
    @ApiModelProperty(position = 120, value = "邮箱", required = true)
    @Email
    @NotNull
    private String mail;

    @ApiModelProperty(position = 130, value = "密码", required = true)
    @Size(min = 8, max = 88)
    private String password;

    @ApiModelProperty(position = 140, value = "密码失效时间, null表示永久有效", example = "2018-12-31 23:59:59")
    private Date passwordExpireDate;

    @ApiModelProperty(position = 150, value = "账号是否激活", required = true)
    @NotNull
    private Boolean enabled;


    @ApiModelProperty(position = 320, value = "所属的班级")
    private SchoolClassDto schoolClass ;
}
